//
//  CaseDTO.m
//  QuickCure37
//
//  Created by 马文星 on 16/6/21.
//  Copyright © 2016年 Demos. All rights reserved.
//

#import "CaseDTO.h"

#define kCaseType       @"caseType"
#define kCaseTypeDetail @"caseTypeDetail"
#define kCaseDesc       @"caseDesc"
#define kImageData      @"imageData"
#define kTimeString     @"timeString"

@implementation CaseDTO

- (void)encodeWithCoder:(NSCoder *)aCoder{
    
    [aCoder encodeObject:_caseType forKey:kCaseType];
    [aCoder encodeObject:_caseTypeDetail forKey:kCaseTypeDetail];
    [aCoder encodeObject:_caseDesc forKey:kCaseDesc];
    [aCoder encodeObject:_imageData forKey:kImageData];
    [aCoder encodeObject:_timeString forKey:kTimeString];
}



- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder{

    if (self = [super init]) {
        
         _caseType       = [aDecoder decodeObjectForKey:kCaseType];
         _caseTypeDetail = [aDecoder decodeObjectForKey:kCaseTypeDetail];
         _caseDesc       = [aDecoder decodeObjectForKey:kCaseDesc];
         _imageData      = [aDecoder decodeObjectForKey:kImageData];
         _timeString      = [aDecoder decodeObjectForKey:kTimeString];

    }
    
    return self;
}

@end
